home *** CD-ROM | disk | FTP | other *** search
- package kool;
-
- import com.siemens.mp.game.Sprite;
- import javax.microedition.lcdui.Image;
-
- public class Ball extends Sprite {
- public static int BIG = 0;
- public static int MEDIUM = 1;
- public static int SMALL = 2;
- public int type;
- public int size;
- public int xSpeed;
- public int ySpeed;
-
- public Ball(int pX, int pY, Image ball, Image mask, int pSize, int pXSpeed, int pYSpeed) {
- super(ball, mask, 1);
- ((Sprite)this).setPosition(pX, pY);
- this.size = pSize;
- this.xSpeed = pXSpeed;
- this.ySpeed = pYSpeed;
- this.size = pSize;
- if (this.size == 14) {
- this.type = BIG;
- } else if (this.size == 10) {
- this.type = MEDIUM;
- } else if (this.size == 6) {
- this.type = SMALL;
- }
-
- }
- }
-